#!/bin/bash

CUR_DIR=$(pwd)

echo "home dir is: $HOME"
echo "cur dir is :$CUR_DIR"

source /opt/ros/humble/setup.bash

cd $HOME/dev/ros2_ws/src/rviz/controller_msgs

rm -rf build install log
colcon build
source ./install/setup.bash


cd $HOME/dev/ros2_ws/src/rviz/rviz_custom_plugins

rm -rf build install log
colcon build
source ./install/setup.bash

cd $HOME/dev/ros2_ws/src/rviz/gcs

rm -rf build install log
colcon build


cd $CUR_DIR
